import ajax from '@/api/apiConfig.js'

//获取警情列表
export const getAlarmListByPage = (data) => {
  return ajax.get('sprinkler/getAlarmListByPage', data)
}

//获取单位警情关联子警情列表
export const getAlarmRelationAlarmList = (data) => {
  return ajax.get('sprinkler/getAlarmRelationAlarmList', data)
}

//获取警情事件列表
export const getAlarmEventList = (data) => {
  return ajax.get('sprinkler/getAlarmEventList', data)
}

//获取警情统计数字
export const getAlarmStats = (data) => {
  return ajax.get('sprinkler/getAlarmStats', data)
}

//获取警情状态统计信息
export const getAlarmStatusStats = (data) => {
  return ajax.get('sprinkler/getAlarmStatusStats', data)
}

//警情处置
export const alarmHandle = (data) => {
  return ajax.post('sprinkler/alarmHandle', data)
}

//警情呼叫
export const alarmCallout = (data) => {
  return ajax.post('sprinkler/alarmCallout', data)
}

// 地址输入提示
export const getAddrSuggestion = (data) => {
  return ajax.getJSON('/baiduapi/place/v2/suggestion?region=江苏&city_limit=false&output=json&ak=6dKoi5fFnOdYO1DnrZhytcwhPCUizujh' +
    '&query=' + data.query)
}

// 路线规划
export const directionlite = (data) => {
  return ajax.getJSON(`/baiduapi/directionlite/v1/${data.method}?ak=6dKoi5fFnOdYO1DnrZhytcwhPCUizujh&origin=${data.origin}&destination=${data.destination}`)
}
